#ifndef ASSEMBLER_H
#define ASSEMBLER_H

#include <string.h>
#include <stdio.h>

//defining lengthes
const int Program_Length = 500;
const int Command_Length = 500;
//Length of the program (Global) - easier to use
int Length = 0;
//Creating the enum for functions
typedef enum
{
   IN,
   OUT,
   OUTR,
   PUSH,
   PUSHR,
   MOV,
   POPR,
   ADD,
   SUB,
   MUL,
   DIV,
   SQRT,
   JER,
   JNER,
   INCR,
   JMP,
   JE,    // jump if equal       (=)
   JNE,   //jump if not equal  (!=)
   JA,    //jump if above     (>)
   JB,    //jump if below    (<)
   JNA,   //jump if not above (<=)
   JNB,   // jump if not below (>=)
   CALL,  //function call
   RET,   //exit function
   END,   //end of program
} Commands;

typedef struct
{
    Commands     cmd;
    int         Argument_Counter;
    int         Arguments[2];
} CMD_Description;

CMD_Description* Asm(FILE* Input, CMD_Description* Text_Of_The_Program, int Key[]);
int wr (FILE* Output, CMD_Description* Text_Of_The_Program);
int wrbin (FILE* Output, CMD_Description* program);



#endif // ASSEMBLER_H
